import request from "../utils/request";

//获取用户列表
export const getUserListAPI=(params)=>{
  return request({
    url:'/user',
    method:'get',
    params:params
  })
}
//新增用户
export const addUser = (params) => {
  return request({
    url:'/user/add',
    method:'post',
    data:params
  })
}
//删除用户
export const deleteByIdAPI=(id)=>{
  return request({
    url:'/user/del',
    method:'delete',
    params:{
      id:id
    }
  })
}
//获取编辑的用户信息
export const getEditUserAPI=(id)=>{
  return request({
    url:'/user/getEdit',
    method:'get',
    params:{
      id:id
    }
  })
}
//提交编辑用户
export const submitEditUserAPI=(params)=>{
  return request({
    url:'/user/edit',
    method:'put',
    data:params
  })
}
